<#assign type=type!'static'/>
<#assign path='/include'+path/>
<@_metadata path=path type=type><#assign a=object/></@_metadata>
<script>
function checkPageSize(){
	if(parseInt($('input[name=size]',navTab.getCurrentPanel()).val())>0){
		$('#placeExtend',navTab.getCurrentPanel()).show();
		$('textarea[name=content]',navTab.getCurrentPanel()).val('');
		$('#placeExtend input,#placeExtend textarea',navTab.getCurrentPanel()).attr('disabled','disabled');
	} else {
		$('#placeExtend',navTab.getCurrentPanel()).hide();
		$('textarea[name=content]',navTab.getCurrentPanel()).val($('#content',navTab.getCurrentPanel()).val());
		$('#placeExtend input,#placeExtend textarea',navTab.getCurrentPanel()).removeAttr('disabled','disabled');
	}
}
$(function(){
	checkPageSize()
});
</script>
<div class="pageContent">
	<form method="post" action="cmsTemplate/saveMetadata.do?navTabId=staticTemplate/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<input name="type" type="hidden" value="${type}"/>
		<input name="path" type="hidden" value="${path}"/>
		<div class="pageFormContent" layoutH="57" style="background:#ffffff;">
			<dl class="nowrap">
				<dt>别名:</dt></dt>
				<dd>
					<input class="required" name="alias" type="text" maxlength="50" size="50" value="${(a.alias)!}"/>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>可前台提交:</dt>
				<dd>
					<input name="allowContribute" type="checkbox"${((a.allowContribute)?has_content&&a.allowContribute)?then(' checked="checked"','')}/>
				</dd>
			</dl>
			<dl class="nowrap">
				<dt>有效数据条数:</dt>
				<dd>
					<input name="size" class="required digits" onchange="checkPageSize();" type="text" value="${(a.size)!5}"/>
				</dd>
			</dl>
			<fieldset id="placeExtend">
				<legend>列表数据扩展字段</legend>
				<#include '../include_page/extends.html'/>
				<#assign pageExtendList=(a.pageExtendList)![]/>
				<@extends 'pageExtendList' pageExtendList/>
			</fieldset>
			<textarea name="content" style="display:none"></textarea>
			<textarea id="content" style="display:none"><#noparse>
<#list page.list>
	<ul>
	<#items as a>
		<li><a href="${a.url!}" target="_blank">${a.title}</a></li>
	</#items>
	</ul>
</#list>
</#noparse></textarea>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</div>